package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Test11 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("aa.eee");
        int a = Integer.MAX_VALUE;
        System.out.println(a);
        fos.write(a>>>24);
        fos.write(a>>>16);
        fos.write(a>>>8);
        fos.write(a);

        FileInputStream fis = new FileInputStream("aa.eee");
        int a1 = fis.read();//127
        int a2 = fis.read();//255
        int a3 = fis.read();//255
        int a4 = fis.read();//255

        int b1 = a1<<24;
        int b2 = a2<<16;
        int b3 = a3<<8;
        int b4 = a4;
        int c = b1 | b2 | b3 | b4;
        System.out.println(c);
        System.out.println(Integer.toBinaryString(c));
    }
}
